// src/api/users.js
import request from '@/utils/request'

// 用户登录
export function loginApi(data) {
  return request({
    url: '/users/login',
    method: 'post',
    data: {
      ...data, loginSystem:2,
    },
  })
}

// 用户注册
export function register(data) {
  return request({
    url: '/users/register',
    method: 'post',
    data,
  })
}

// 获取用户信息
export function getUserInfo() {
  return request({
    url: '/users/getUserInfo?system=2',
    method: 'get',
  })
}

// 用户登出
export function logout() {
  return request({
    url: '/users/logout',
    method: 'post',
  })
}